﻿using System;
using System.Configuration;

namespace Zeenck.Configuration
{
    public static class Zeenck
    {
        public class Info
        {
            public static String ApplicationName { get { return ConfigurationManager.AppSettings["Zeenck.ApplicationName"] ?? "Zeenck"; } }

            public static class Footer
            {
                public static String CopyRightText { get { return ConfigurationManager.AppSettings["Zeenck.CopyRight"] ?? "© 2011 Zeenck. All rights reserved"; } }
                public static String PrivacyPolicyLinkText { get { return ConfigurationManager.AppSettings["Zeenck.PrivacyPolicy.Text"] ?? "Privacy Policy"; } }
                public static String TermAndConditionsLinkText { get { return ConfigurationManager.AppSettings["Zeenck.TermConditions.Text"] ?? "Terms & Conditions"; } }
            }

            public static class Login
            {
                public static String Title { get { return ConfigurationManager.AppSettings["Zeenck.Login.Page.Title"] ?? "Login"; } }
            }

            public static class Registration
            {
                public static String Title { get { return ConfigurationManager.AppSettings["Zeenck.Registration.Page.Title"] ?? "Register"; } }
                public static String CompleteTitle { get { return ConfigurationManager.AppSettings["Zeenck.Registration.Page.Complete.Title"] ?? "Registration Complete"; } }
                public static String ConfirmationTitle { get { return ConfigurationManager.AppSettings["Zeenck.Registration.Page.Confirmation.Title"] ?? "Registration Confirmation"; } }
                public static String CompleteThankYou { get { return ConfigurationManager.AppSettings["Zeenck.Registration.Page.Complete.Message.ThankYou"] ?? "Thank you {0} {1} for registering for Zeenck!"; } }
                public static String CompleteCallToAction { get { return ConfigurationManager.AppSettings["Zeenck.Registration.Page.Complete.Message.CallToAction"] ?? "Check {0} for a confirmation link to activate your account!"; } }
                public static String ConfirmationSuccessful { get { return ConfigurationManager.AppSettings["Zeenck.Registration.Page.Confirmation.Successful.Message"] ?? "Your account is now active."; } }
                public static String ConfirmationUnsuccessful { get { return ConfigurationManager.AppSettings["Zeenck.Registration.Page.Confirmation.Unsuccessful.Message"] ?? "Your confirmation code is not valid."; } }
            }

            public static class ResetPassword
            {
                public static String ResetPasswordTitle { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.Title"] ?? "Password Recovery"; } }
                public static String VerifyEmailBeginTitle { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.VerifyEmail.Begin.Title"] ?? "Forgot Password?"; } }
                public static String VerifyEmailCompleteTitle { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.VerifyEmail.Complete.Title"] ?? "Check Your Email!"; } }
                public static String VerifyEmailCompleteMessage { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.VerifyEmail.Complete.Message"] ?? "An email with instructions to reset your password has been sent to your email address."; } }
                public static String ResetPasswordHeader { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.PasswordReset.Title"] ?? "Reset Your Password"; } }
                public static String ResetPasswordSuccessHeader { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.PasswordReset.Success.Title"] ?? "Success"; } }
                public static String ResetPasswordSuccessMessage { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.PasswordReset.Success.Message"] ?? "Your password has been reset."; } }
                public static String ResetPasswordFailureHeader { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.PasswordReset.Failure.Title"] ?? "Uh-Oh"; } }
                public static String ResetPasswordFailureMessage1 { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.PasswordReset.Failure.Message1"] ?? "We were unable to reset your password. Please try again."; } }
                public static String ResetPasswordFailureMessage2 { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.PasswordReset.Failure.Message2"] ?? "Your confirmation code is not valid."; } }
                public static String ResetPasswordStepConfirmEmailText { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.PasswordReset.Step.ConfirmEmail"] ?? "Confirm E-mail"; } }
                public static String ResetPasswordStepResetPasswordText { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.PasswordReset.Step.ResetPassword"] ?? "Reset Password"; } }
                public static String ForgotPasswordText { get { return ConfigurationManager.AppSettings["Zeenck.ResetPassword.Page.Login.ForgotPasswordText"] ?? "Forgot your password?"; } }
            }

            public static class Email
            {
                public static String ExchangeServerHost { get { return ConfigurationManager.AppSettings["Zeenck.ExchangeServer.Host"] ?? ""; } }
                private static String ExchangeServerPortString { get { return ConfigurationManager.AppSettings["Zeenck.ExchangeServer.Port"] ?? "25"; } }
                public static Int32 ExchangeServerPort { get { return String.IsNullOrWhiteSpace(ExchangeServerPortString) ? 25 : Int32.Parse(ExchangeServerPortString); } }

                public static class Account
                {
                    public static class Welcome
                    {
                        public static String FromAddress { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.From.Address"] ?? "noreply@zeenck.com"; } }
                        public static String FromName { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.From.Name"] ?? "Zeenck"; } }
                        public static String EmailSubject { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.WelcomeEmail.Subject"] ?? "Welcome to Zeenck!"; } }
                        public static String EmailTemplateFile { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.WelcomeEmail.Template.File"] ?? "content/html/email_templates/default.html"; } }
                        public static String EmailTemplateLogo { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.WelcomeEmail.Logo"] ?? "content/images/email_templates/ingagenetworks_logo.png"; } }
                        public static String EmailTemplateIntroduction { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.WelcomeEmail.Template.Introduction"] ?? "Dear {0} {1},"; } }
                        public static String EmailTemplateMessage { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.WelcomeEmail.Template.Message"] ?? "Thank you for creating a Zeenck account!"; } }
                        public static String EmailTemplateCallToAction { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.WelcomeEmail.Template.CallToAction"] ?? "Please follow this link to confirm your Zeenck account."; } }
                    }

                    public static class ResetPassword
                    {
                        public static String FromAddress { get { return ConfigurationManager.AppSettings["Zeenck.Email.ResetPassword.From.Address"] ?? "noreply@zeenck.com"; } }
                        public static String FromName { get { return ConfigurationManager.AppSettings["Zeenck.Email.ResetPassword.From.Name"] ?? "INgage Networks"; } }
                        public static String EmailSubject { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.ResetPasswordEmail.Subject"] ?? "Reset your Zeenck account password"; } }
                        public static String EmailTemplateFile { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.ResetPasswordEmail.Template.File"] ?? "content/html/email_templates/default.html"; } }
                        public static String EmailTemplateLogo { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.ResetPasswordEmail.Logo"] ?? "content/images/email_templates/zeenck_logo.png"; } }
                        public static String EmailTemplateIntroduction { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.ResetPasswordEmail.Template.Introduction"] ?? "Dear {0} {1},"; } }
                        public static String EmailTemplateMessage { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.ResetPasswordEmail.Template.Message"] ?? "A request to reset your Zeenck account password has been submitted."; } }
                        public static String EmailTemplateCallToAction { get { return ConfigurationManager.AppSettings["Zeenck.Email.Register.ResetPasswordEmail.Template.CallToAction"] ?? "Please follow this link to reset your Zeenck account password."; } }
                    }
                }
            }
        }

        public static class CustomerSupport
        {
            public static String Email { get { return ConfigurationManager.AppSettings["Zeenck.CustomerSupport.Email"] ?? "support@zeenck.com"; } }
        }
    }
}